import React, { Component } from 'react'
import { Form, Input, Button,Row, Col ,Space } from 'antd';
import './Search.css' 
 
 
interface Props {
    
}
interface State {
    
}
  

const layout = {
    labelCol: { span: 8 },
    wrapperCol: { span: 16 },
  };


export default class Search extends Component<Props, State> {
    state = {}
    onFinish = (values: any) => {
        console.log('Success:', values);
      };
    
    onFinishFailed = (errorInfo: any) => {
        console.log('Failed:', errorInfo);
      };

    handleChange(value:any) {
        console.log(`selected ${value}`);
    }
    render() {
        return ( 
            <div style={{width:'100%'}}>
                <Form
                {...layout}
                name="basic"
                initialValues={{ remember: true }}
                onFinish={this.onFinish}
                onFinishFailed={this.onFinishFailed}
                layout="inline"
                >
                    <Row style={{width:'100%'}}>
                        <Col span={20}>
                            <Row>
                            <Col span={8}>
                                <Form.Item
                                    label="代码/名称" 
                                    name="codeName"
                                    rules={[{ message: '请输入代码或者名称!' }]}
                                >
                                    <Input placeholder="请输入或者名称" />
                                </Form.Item>
                            </Col>

                            <Col span={8}>
                                <Form.Item
                                    label="代码" 
                                    name="codeName"
                                    rules={[{ message: '请输入代码' }]}
                                >
                                    <Input placeholder="请输入或者代码" />
                                </Form.Item>
                            </Col>
                            </Row>
                        </Col>
                        
                        
                        <Col span={4}>
                            <Space style={{float:'right'}}>
                                <Button type="primary" htmlType="submit">
                                    查询
                                </Button>
                                <Button style={{ background: 'rgb(81, 97, 115)', color: 'rgb(255, 255, 255)'}} type="primary" htmlType="button">
                                    重置
                                </Button>
                            </Space>
                            
                        </Col>
                    </Row>
                </Form>
            </div>
            
        )
    }
}
